﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="SystemGroupList.aspx.cs" Inherits="VSM.SystemGroupList" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        &nbsp;System Group List</h2>
    <asp:HiddenField ID="hdnisUpdate" runat="server" />
    <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div style="margin-left: 5px; width: 99%;">
                <hr />
                <table border="0" width="100%" style="background-color: #D1D4D8; font-weight: bold;">
                    <tr>
                        <td style="width: 100px">
                            Dealer:
                        </td>
                        <td colspan="3">
                            <asp:DropDownList ID="ddl_Dealer" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_Dealer_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
                <hr />
                <table style="width: 100%;" border="0">
                    <tr>
                        <td style="width: 35%">
                            <asp:Button ID="btnAddGroup" runat="server" Text="New Group" Style="background-image: url('/Images/bgButton.png');
                                background-repeat: no-repeat;" OnClick="btnAddGroup_Click" />
                        </td>
                        <td style="width: 65%">
                            <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:GridView ID="grvGroups" CssClass="GridInner" runat="server" Width="100%" BorderColor="White"
                                BackColor="White" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
                                HeaderStyle-Height="27px" CellSpacing="2" HeaderStyle-VerticalAlign="Middle"
                                OnRowDeleting="DeleteItem" OnRowDataBound="grvSearchResult_RowDataBound" AllowPaging="True"
                                OnPageIndexChanging="grvSearchResult_PageIndexChanging" PageSize="20">
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                <Columns>
                                    <asp:TemplateField HeaderText="Action">
                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkDelete" runat="server" Text="Delete" OnClick="lnkDelete_Click"
                                                OnClientClick='return confirm("Are you sure to delete?");'></asp:LinkButton>
                                            <asp:LinkButton ID="lnkEdit" runat="server" Text='Edit' BorderStyle="none" OnClick="lnkEdit_Click"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Group Code">
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblGroupCode" runat="server" Text='<%# Bind("ID_Group") %>' BorderStyle="none"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Group Name">
                                        <ItemStyle HorizontalAlign="left" Width="50%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblGroupName" runat="server" Text='<%# Bind("Description") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Dealer Code">
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lblDealerCode" runat="server" Text='<%# Bind("ID_Dealer") %>'
                                                BorderStyle="none" Enabled="false">
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False"
                                    Height="27px" VerticalAlign="Bottom" />
                                <EmptyDataTemplate>
                                    <table class="GridInner" style="width: 100%; border-color: White;" border="1" rules="all"
                                        cellspacing="2" cellpadding="2">
                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                            background-color: rgb(96, 149, 201);">
                                            <th style="width: 10%">
                                                <span>Action</span>
                                            </th>
                                            <th style="width: 20%">
                                                <span>Group Code</span>
                                            </th>
                                            <th style="width: 50%">
                                                <span>Group Name</span>
                                            </th>
                                            <th style="width: 20%">
                                                <span>Dealer Code</span>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
                <br />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
